package itdep.common.resolver;

import itdep.common.domain.Entity;
import itdep.common.domain.GenericEntityDao;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author Ivan Khalopik
 * @version $Revision: 4 $ $Date: 2010-06-10 13:13:16 +0000 (Thu, 10 Jun 2010) $
 */
public class DaoResolver<D extends GenericEntityDao> extends SimpleResolver<Class<? extends Entity<?>>, D> {

	@SuppressWarnings({"unchecked"})
	@Autowired
	public void setDaos(final List<GenericEntityDao> daos) {
		for (GenericEntityDao dao : daos) {
			addToSource((D) dao);
		}
	}
}
